1. Field of the Invention
The present invention generally relates to information processing apparatuses, methods, and computer-readable programs. More particularly, the invention relates to an information processing apparatus in which power supply to at least a part of the apparatus is terminated after a period of a non-operation status.
2. Description of the Related Art
Conventionally, fault analysis (such as debugging) of a program that runs in an embedded apparatus or the like is typically conducted by analyzing a log outputted by the program. The source code of such a program includes instructions (such as the “printf” function of the computer language C) embedded at certain locations in advance. These instructions are provided for outputting various information, such as the values of variables used by the program or information about the status of hardware on which the program runs, to a log file. In the event of a fault, the log file produced in accordance with such instructions (“log output instructions”) is analyzed to infer or identify the cause of the fault.
However, the log file (i.e., the one that is initially outputted) based on the previously embedded log output instruction may prove insufficient for detailed analysis in many cases. In such a case, the site of failure is narrowed to some extent based on the initially outputted log file, and then the source code of the program is modified so as to output a more detailed log concerning areas near the fault, followed by compiling and linking to replace the program. If the cause cannot be identified even with a newly outputted log file, the source code is further embedded with a log output instruction, and the aforementioned process is repeated. Thus, a log-based fault analysis sometimes requires a very complicated operation.
To overcome this problem, Japanese Laid-Open Patent Application No. 2004-139572 discloses a technology whereby a certain location (diagnosed position) of a program as it runs is interrupted dynamically (i.e., during execution of the program) by a process of a diagnosing program. Such a diagnosing program may reference the values of variables of the diagnosed program. At the end of the process of the diagnosing program, process returns to the position where the diagnosed program has been interrupted by the diagnosing program. This technology makes it possible to output a log concerning the diagnosed program without requiring modification of the source code of the diagnosed program.
However, the aforementioned technology requires that the apparatus that is diagnosed by the diagnosing program be connected, via a network, to a computer (hereafter referred to as a “managing server”) that manages the diagnosing program, so that the diagnosing program can be sent to the diagnosed apparatus via the network under the control of the managing server.
The diagnosing program transmitted to the apparatus is loaded in a random access memory (RAM) and then executed. This means that the program does not exist when the apparatus is once turned off and then restarted, resulting in the need for the user to perform an operation to once again download the diagnosing program from the managing server and apply it to the diagnosed program.
These days, many apparatuses are equipped with an operation mode called an “energy saving mode”. In the energy saving mode, power supply is partially terminated upon continuation of a non-operation status. In some of such systems, the energy saving mode also terminates power supply to RAM. Thus, the probability of loss of a diagnosing program from RAM is higher in systems that have the energy saving mode.
In a known technology, an image in RAM is saved before the termination of supply of power to a computer so that the image can be restored in RAM after reboot. However, this technology merely reproduces in RAM the same state as before the termination of power supply. Thus, such a technology does not involve an automatic process of reapplying the diagnosing program after rebooting the computer and then re-executing the diagnosed program from the beginning.